package org.dx.oho.entity;

import java.util.Date;
import java.util.Objects;

/**
 *create by duanx 2020/11/6
 *@description： 微信账号信息表
 *@classname: WeChatAuth
 *@author: duanx
 *@date: 2020/11/6 15:21
 **/
public class WeChatAuth extends BaseEntity {
    /**
     * 本地ID
     */
    private Long weChatAuthId;
    /**
     * 用户信息
     */
    private PersonInfo personInfo;
    /**
     * 微信ID
     */
    private String openId;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        WeChatAuth that = (WeChatAuth) o;
        return Objects.equals(weChatAuthId, that.weChatAuthId) &&
                Objects.equals(personInfo, that.personInfo) &&
                Objects.equals(openId, that.openId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(weChatAuthId, personInfo, openId);
    }

    @Override
    public String toString() {
        return "WeChatAuth{" +
                "weChatAuthId=" + weChatAuthId +
                ", personInfo=" + personInfo +
                ", openId='" + openId + '\'' +
                '}';
    }
}
